#!/bin/bash
# mysql -h 127.0.0.1 -P 3306 -u root -px1ah -e 'drop database if exists farmer_test;'
# mysql -h 127.0.0.1 -P 3306 -u root -px1ah -e 'create database farmer_test character set=utf8mb4 collate=utf8mb4_unicode_ci;'
# mysql -h 127.0.0.1 -P 3306 -u root -px1ah -e "create user 'farmer_test_c'@'127.0.0.1' identified by 'farmer_test';"
# mysql -h 127.0.0.1 -P 3306 -u root -px1ah -e  "grant all privileges on farmer_test.* to 'farmer_test_c'@'%';"
# mysql -h 127.0.0.1 -P 3306 -u root -px1ah  'farmer_test' < ./ci/mysql.sql

mysql -e 'drop database if exists farmer_test;'
mysql -e 'create database farmer_test character set=utf8mb4 collate=utf8mb4_unicode_ci;'
# mysql -e "create user 'farmer_test_c'@'127.0.0.1' identified by 'farmer_test';"
mysql -e  "grant all privileges on farmer_test.* to root@localhost;"
mysql 'farmer_test' < ./ci/mysql.sql
